{{ $page_data := index $.Site.Data.docs.pages .Params.docname }}
<a class="dropdown-trigger" id="reference-languages-trigger" data-panel-id="l10n-versions-dropdown" href="#">{{ if isset .Params "lang" }}
  {{ if isset $.Site.Data.lang_names .Params.lang }}{{ index $.Site.Data.lang_names .Params.lang }}{{ else }}{{ .Params.lang }}{{ end }} {{ else }} {{ $.Site.Data.lang_names.en }} {{ end }}▾</a>
<div class='dropdown-panel right' id='l10n-versions-dropdown'>
  <header>Localized versions of <strong>{{ .Params.docname }}</strong> manual</header>
  <ol class='reference-previous-versions'>
    {{ if isset $page_data "latest-changes" }}
    <li>
      <a href="{{ relURL (print "docs/" .Params.docname) }}"><span class="version">{{ .Site.Data.lang_names.en }}</span>
      </a>
      </li>
    {{ end }}
    {{ range $code, $value := $page_data.languages }}
    <li>
        <a href="{{ relURL (print "docs/" $.Params.docname "/" $code) }}"><span class="version">{{ index $.Site.Data.lang_names $code }}</span>
        </a>
        </li>
    {{ end }}
  </ol>
  <footer>
    Want to read in your language or fix typos?<br/> <a href="https://github.com/jnavila/git-manpages-l10n">You can help translate this page</a>.
  </footer>
</div>
